log using "$Rep_smokelabor/2_analysis/output_logs/appendix_table1.log", replace 

	use "$Rep_smokelabor/1_build/regdata/county_quarter.dta", clear 
	
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()
	
	** panel a 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_dens [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_a.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_dens [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_a.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_dens [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_a.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_dens [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_a.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_a.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_a.dta", replace
		restore 
		
	}
	
	** panel b, first row
	if 1 {
		
		* pm2.5
		reghdfe pm25 g*_tavg g*_wdir hms_deep [aw=seer_pop], a(g_ppt g_wspd fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b1.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll g*_tavg g*_wdir hms_deep [aw=seer_pop], a(g_ppt g_wspd fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b1.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal g*_tavg g*_wdir hms_deep [aw=seer_pop16plus], a(g_ppt g_wspd fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp g*_tavg g*_wdir hms_deep [aw=seer_pop] , a(g_ppt g_wspd fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b1.dta", replace
		restore 
		
	
	}
	
	** panel b, second row
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b2.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b2.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(c.g1_wdir##i.statefip c.g2_wdir##i.statefip c.g3_wdir##i.statefip c.g4_wdir##i.statefip c.g5_wdir##i.statefip c.g6_wdir##i.statefip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b2.dta", replace
		restore 
		
	}
	
	** panel b, third row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b3.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b3.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(c.g1_wdir##i.countyfip c.g2_wdir##i.countyfip c.g3_wdir##i.countyfip c.g4_wdir##i.countyfip c.g5_wdir##i.countyfip c.g6_wdir##i.countyfip fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave hms_deep using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_b3.dta", replace
		restore 
		
	}
	
	** panel c, first row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c1.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c1.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c1.dta", replace
		restore 
		
	}
	
	** panel c, second row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_divisionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c2.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_divisionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c2.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_divisionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_divisionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c2.dta", replace
		restore 
		
	}
	
	** panel c, third row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_regionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c3.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_regionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c3.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_regionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_regionyr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c3.dta", replace
		restore 
		
	}
	
	** panel c, fourth row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c4.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c4.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c4.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c4.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c4.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_c4.dta", replace
		restore 
		
	}
	
	
	use "$Rep_smokelabor/1_build/regdata/county_year.dta", clear 
	
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()
	
	** panel d, first row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(countyfip fe_styr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d1.dta", table(pm25, `tbl_settings_log') replace
		sleep 3000 
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(countyfip fe_styr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d1.dta", table(earnings, `tbl_settings_log') append
		sleep 3000 
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(countyfip fe_styr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d1.dta", table(employment, `tbl_settings_pmil') append
		sleep 3000 
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(countyfip fe_styr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d1.dta", table(lfp, `tbl_settings_pmil') append
		sleep 3000 
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d1.dta", replace
		restore 
		
	}
	
	** panel d, second row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(countyfip fe_divisionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d2.dta", table(pm25, `tbl_settings_log') replace
		sleep 3000 
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(countyfip fe_divisionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d2.dta", table(earnings, `tbl_settings_log') append
		sleep 3000 
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(countyfip fe_divisionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d2.dta", table(employment, `tbl_settings_pmil') append
		sleep 3000 
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(countyfip fe_divisionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d2.dta", table(lfp, `tbl_settings_pmil') append
		sleep 3000 
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d2.dta", replace
		restore 
		
	}
	
	** panel d, third row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(countyfip fe_regionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d3.dta", table(pm25, `tbl_settings_log') replace
		sleep 3000 
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(countyfip fe_regionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d3.dta", table(earnings, `tbl_settings_log') append
		sleep 3000 
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(countyfip fe_regionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d3.dta", table(employment, `tbl_settings_pmil') append
		sleep 3000 
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(countyfip fe_regionyr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d3.dta", table(lfp, `tbl_settings_pmil') append
		sleep 3000 
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d3.dta", replace
		restore 
		
	}
	
	** panel d, fourth row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(countyfip rfrnc_yr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d4.dta", table(pm25, `tbl_settings_log') replace
		sleep 3000 
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(countyfip rfrnc_yr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d4.dta", table(earnings, `tbl_settings_log') append
		sleep 3000 
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(countyfip rfrnc_yr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d4.dta", table(employment, `tbl_settings_pmil') append
		sleep 3000 
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(countyfip rfrnc_yr) vce(cluster countyfip fe_styr)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d4.dta", table(lfp, `tbl_settings_pmil') append
		sleep 3000 
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d4.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_d4.dta", replace
		restore 
		
	}
	
	use "$Rep_smokelabor/1_build/regdata/county_quarter.dta", clear 
	
	local tbl_settings_log format(%6.3f) parentheses(stderr) asterisk()
	local tbl_settings_pmil format(%6.1f) parentheses(stderr) asterisk()
	
	** panel e, first row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e1.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e1.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr i.fe_countyqtroy##c.rfrnc_yr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e1.dta", replace
		restore 
		
	}
	
	** panel e, second row 
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e2.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e2.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e2.dta", replace
		restore 
		
	}
	
	** panel e, third row 
	if 1 {
		
		* pm2.5
		reghdfe d_pm25 d_hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e3.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll d_hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e3.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal d_hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp d_hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_stqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_e3.dta", replace
		restore 
		
	}
	
	** panel f, first row
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f1.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f1.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f1.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_divisionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f1.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f1.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f1.dta", replace
		restore 
		
	}
	
	** panel f, second row
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f2.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f2.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f2.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip fe_regionqtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f2.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f2.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f2.dta", replace
		restore 
		
	}
	
	** panel f, third row
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f3.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f3.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f3.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip rfrnc_qtros)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f3.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f3.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f3.dta", replace
		restore 
		
	}
	
	** panel f, fourth row
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f4.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f4.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f4.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster countyfip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f4.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f4.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f4.dta", replace
		restore 
		
	}
	
	** panel f, fifth row
	if 1 {
		
		* pm2.5
		reghdfe pm25 hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f5.dta", table(pm25, `tbl_settings_log') replace
		
		* income 
		reghdfe d_pc_qwi_payroll hms_deep [aw=seer_pop], a(fe_countyqtroy fe_styr) vce(cluster statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f5.dta", table(earnings, `tbl_settings_log') append
		
		* emp 
		reghdfe d_pmil_qwi_emptotal hms_deep [aw=seer_pop16plus], a(fe_countyqtroy fe_styr) vce(cluster statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f5.dta", table(employment, `tbl_settings_pmil') append
		
		* lfp
		reghdfe d_pmil_lau_lfp hms_deep [aw=seer_pop] , a(fe_countyqtroy fe_styr) vce(cluster statefip)
		regsave using "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f5.dta", table(lfp, `tbl_settings_pmil') append
		
		preserve 
			use "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f5.dta", clear
			drop if var == "r2"
			drop if var == "_id"
			drop if strpos(var, "_cons_") > 0
			replace var="observations" if var=="N"
			ingap 3
			list , sep(0)
			saveold "$Rep_smokelabor/2_analysis/output_tables/appendix_table1_f5.dta", replace
		restore 
		
	}
	
	
	
log close
